<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>pnm_info</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
HREF="refmanual.html"><LINK
REL="PREVIOUS"
TITLE="imat_wav_write"
HREF="man.imat-wav-write.html"><LINK
REL="NEXT"
TITLE="pnm_type"
HREF="man.pnm-type.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man.imat-wav-write.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man.pnm-type.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="MAN.PNM-INFO"
></A
>pnm_info</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN1355"
></A
><H2
>Name</H2
>pnm_info&nbsp;--&nbsp;Get information from a PNM image file</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN1358"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN1359"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;it/io.h&gt;
      </PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>int pnm_info</CODE
>( const char * filename, char * p_pnm_type, int * p_width, int * p_height, int * p_max_val, char * comments, int length
        );</CODE
></P
><P
></P
></DIV
></DIV
><H2
>DESCRIPTION</H2
><P
> This function reads the width, height, type, maximum value and comments from a PNM image file specified by <CODE
CLASS="PARAMETER"
>filename</CODE
>. The values of these informations are stored in the corresponding pointers. The <CODE
CLASS="PARAMETER"
>length</CODE
> argument gives the maximum size of the <CODE
CLASS="PARAMETER"
>comments</CODE
> buffer in which the comments are stored.  </P
><H2
>RETURN VALUE</H2
><P
>    0 if the function was unable to open the file, otherwise 0
   </P
><H2
>EXAMPLE</H2
><PRE
CLASS="PROGRAMLISTING"
>&#13;#include &lt;io.h&gt;

...

int width, height, maxval, type;
char comment[1000];
pnm_info("image.pgm", &#38;type, &#38;width, &#38;height, &#38;maxval, comments, 1000);</PRE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man.imat-wav-write.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man.pnm-type.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>imat_wav_write</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="refmanual.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>pnm_type</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>